#!/usr/bin/env ruby
#puts "#{File.dirname(__FILE__)/backup_base.rb"
require "#{File.dirname __FILE__}/backup_base.rb"
require "fileutils"

root = "/home2/neocoinn"
dest = "#{root}/var/wiki_store"
FileUtils.mkdir_p dest
fn = "CenterStage-#{Time.now.strftime "%Y%m%d_%H%M"}.tar.bz2"

message 'Backup Wiki' do
  print(system("cd #{root}/www;tar -jcf #{dest}/#{fn} CenterStage"))
end

exit 

#file_path = "#{dest}/#{fn}"
#message "Send #{fn} to nextst.com" do
#  upload_file "#{file_path}", "wiki/#{fn}"
#end if File.exist? file_path 
